
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Domain
{
    /// <summary>
    /// 物料明细表
    /// </summary>

    public class MaterialDetail
    {

        [Key]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; } = string.Empty;

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; } = string.Empty;

        /// <summary>
        /// 型号规格
        /// </summary>
        public string Spec { get; set; } = string.Empty;

        /// <summary>
        /// 主计量单位
        /// </summary>
        public string Unit { get; set; } = string.Empty;

        /// <summary>
        /// 需求数量
        /// </summary>
        public int RequiredQty { get; set; }

        /// <summary>
        /// 可用库存量
        /// </summary>
        public int AvailableQty { get; set; }

        /// <summary>
        /// 已领用量
        /// </summary>
        public int ReceivedQty { get; set; }

        /// <summary>
        /// 领料方式
        /// </summary>
        public string ReceiveMethod { get; set; } = string.Empty;

        /// <summary>
        /// 供应方式
        /// </summary>
        public string SupplyMethod { get; set; } = string.Empty;

        /// <summary>
        /// 备注信息(可选)
        /// </summary>
        public string? Remark { get; set; }
        public string UpId { get; set; }
    }
}
